<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<head>
<meta name="menu" content="assetMenu" />
<meta name="nav" content="1" />
<meta name="acc" content="0-2" />
<title>图书管理</title>
<script>
		$(document).ready(function() {
		 $("input[id='buyTimeBefore']").addClass("Wate").bind("click", function(){
    	 WdatePicker({skin:'whyGreen',minDate:'1900-10-01',maxDate:'#F{$dp.$D(\'buyTimeEnd\')||\'%y-%M-%d\'}',dateFmt:'yyyy-MM-dd'});});
		 $("input[id='buyTimeEnd']").addClass("Wate").bind("focus", function(){
    	 WdatePicker({skin:'whyGreen',minDate:'#F{$dp.$D(\'buyTimeBefore\')}',maxDate:'%y-%M-%d',dateFmt:'yyyy-MM-dd'});});
		
		 $("#importdata").click(function(){
			 var url = "${ctx}/asset/book/information_import.action";
			 openWindowAsDialog(url);
		 });
		});
	</script>
</head>
<body>
<div id="heading" class="book"><h6>图书列表</h6></div>
<div id="message"><s:actionmessage theme="custom"
	cssClass="success" /></div>
<form id="mainForm" action="${ctx }/asset/book/information.action" method="get" class="yform">
<div id="filter">
<ul>
<li>图书编号:<input type="text" name="filter_LIKES_bookNo" value="${param['filter_LIKES_bookNo'] }"/></li>
<li>图书类别:<pt:code name="filter_LIKES_bookType" category="2023" prompt="全部" default="${param['filter_LIKES_bookType']}"></pt:code></li>
<li>图书名称:<input type="text" name="filter_LIKES_bookName" value="${param['filter_LIKES_bookName']}" /></li>
<li>作者:<input type="text" name="filter_LIKES_edit" value="${param['filter_LIKES_edit']}" /></li>
</ul>
<div class="type-button"><input type="button" onclick="search();" class="search" value="查询"/></div>

</div>
<div id="content">
<table id="contentTable">
	<tr>
		<th><a id="createDate" href="javascript:sort('createDate','asc')">序号</a></th>
		<th><a id="bookNo" href="javascript:sort('bookNo','asc')">图书编号</a></th>
		<th><a id="bookType"  href="javascript:sort('bookType','asc')">图书类别</a></th>
		<th><a id="bookName" href="javascript:sort('bookName','asc')">图书名称</a></th>
		<th><a id="edit" href="javascript:sort('effectiveDate','effectiveDate')">实施时间</a></th>
		<th>操作</th>
	</tr>
	<c:forEach items="${page.result}" var="book" varStatus="status">
		<tr>
			<td>${page.first+status.index }</td>
			<td>${book.bookNo}</td>
			<td><pt:code  prompt="全部" code="${book.bookType}" category="2023"></pt:code></td>
			<td>${book.bookName}</td>
			<td><fmt:formatDate value="${book.effectiveDate}" pattern="yyyy-MM-dd"/> </td>
			<td><a href="${ctx}/asset/book/information!input.action?id=${book.id}">编辑</a>
			<a href="${ctx}/asset/book/information!delete.action?id=${book.id}" onclick="return confirmDelete();">删除</a>
			</td>
		</tr>
	</c:forEach>
</table>
</div>
<jsp:include page="/common/page.jsp" flush="true"></jsp:include>
<div class="type-button">
<input  type="button" class="button"  id="importdata"  value="导入" />
<input onclick="location.href='${ctx}/asset/book/information!input.action'" type="button" class="submit" value="新增" /></div>
</form>
</body>